package com.ydh.company.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ydh.company.flag.PurchaseOrderFlag;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.sql.Timestamp;
import java.util.List;

public class PurchaseOrderMain {
  @ApiModelProperty(name = "purchaseOrderMainId",notes = "采购订单主表id",dataType = "string",required = false)
  private String purchaseOrderMainId;
  @NotBlank(message = "采购单号不能为空",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "purchaseOrderNumber",notes = "采购订单号",dataType = "string",required = true)
  private String purchaseOrderNumber;
  @ApiModelProperty(name = "payStatus",notes = "付款状态",dataType = "long",required = true)
  private long payStatus;
  @NotBlank(message = "供应商不能为空",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "supplierId",notes = "供应商id",dataType = "string",required = true)
  private String supplierId;
  @ApiModelProperty(name = "userId",notes = "采购员id",dataType = "string",required = true)
  private String userId;
  @ApiModelProperty(name = "goodsStatus",notes = "状态",dataType = "string",required = true)
  private long goodsStatus;
  @NotBlank(message = "日期不能为空",groups = {PurchaseOrderFlag.class})
  @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",locale = "zh",timezone = "GMT+8")
  @ApiModelProperty(name = "date",notes = "日期",dataType = "Timestamp",required = true)
  private java.sql.Timestamp date;
  @ApiModelProperty(name = "totalCount",notes = "合计",dataType = "double",required = true)
  private double totalCount;
  @ApiModelProperty(name = "remarks",notes = "备注",dataType = "string",required = true)
  private String remarks;
  @ApiModelProperty(name = "creator",notes = "制单人",dataType = "string",required = true)
  private String creator;
@Pattern(regexp = "[1-9]\\d*.\\d*|0\\.\\d*[1-9]\\d*",message = "只能传正浮点数",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "purchasePrice",notes = "采购金额",dataType = "double",required = true)
  private double purchasePrice;
  private Supplier supplier;
  private User user;
   private List<PurchaseOrderDetail> purchaseOrderDetail;

  public String getSupplierId() {
    return supplierId;
  }

  public void setSupplierId(String supplierId) {
    this.supplierId = supplierId;
  }

  public String getUserId() {
    return userId;
  }

  public void setUserId(String userId) {
    this.userId = userId;
  }

  public long getGoodsStatus() {
    return goodsStatus;
  }

  public void setGoodsStatus(long goodsStatus) {
    this.goodsStatus = goodsStatus;
  }

  public Timestamp getDate() {
    return date;
  }

  public void setDate(Timestamp date) {
    this.date = date;
  }

  public double getTotalCount() {
    return totalCount;
  }

  public void setTotalCount(double totalCount) {
    this.totalCount = totalCount;
  }

  public String getRemarks() {
    return remarks;
  }

  public void setRemarks(String remarks) {
    this.remarks = remarks;
  }

  public String getCreator() {
    return creator;
  }

  public void setCreator(String creator) {
    this.creator = creator;
  }

  public double getPurchasePrice() {
    return purchasePrice;
  }

  public void setPurchasePrice(double purchasePrice) {
    this.purchasePrice = purchasePrice;
  }

  public Supplier getSupplier() {
    return supplier;
  }

  public void setSupplier(Supplier supplier) {
    this.supplier = supplier;
  }

  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }

  public List<PurchaseOrderDetail> getPurchaseOrderDetail() {
    return purchaseOrderDetail;
  }

  public void setPurchaseOrderDetail(List<PurchaseOrderDetail> purchaseOrderDetail) {
    this.purchaseOrderDetail = purchaseOrderDetail;
  }

  public String getPurchaseOrderMainId() {
    return purchaseOrderMainId;
  }

  public void setPurchaseOrderMainId(String purchaseOrderMainId) {
    this.purchaseOrderMainId = purchaseOrderMainId;
  }



  public String getPurchaseOrderNumber() {
    return purchaseOrderNumber;
  }

  public void setPurchaseOrderNumber(String purchaseOrderNumber) {
    this.purchaseOrderNumber = purchaseOrderNumber;
  }


  public long getPayStatus() {
    return payStatus;
  }

  public void setPayStatus(long payStatus) {
    this.payStatus = payStatus;
  }

}
